<!--
 * @Description: Description
 * @Author: Kerwin
 * @Date: 2024-08-27 10:19:16
 * @LastEditTime: 2024-08-27 10:19:21
 * @LastEditors:  Please set LastEditors
-->
<template>
	<view class="wx-index">
		<image class="wx-bg" src="https://image.blacksilverscore.com/uploads/47536ac1-8afb-418a-89e7-41fb69214734.png"
			mode="scaleToFill"></image>
		<view class="wx-btns" v-if="!userStore.hasLogin">
			<view class="wx-btn wx-btn-info" @click="goLogin">登录</view>
			<view class="wx-btn wx-btn-normal" @click="goRegister">注册</view>
		</view>
	</view>
</template>

<script setup lang="ts">
import { route } from '@/utils/common';
import { onLoad } from '@dcloudio/uni-app';
import { useUserStore } from '@/store';

const userStore = useUserStore();
const goLogin = () => {
	route({
		url: '/pages/login/index',
		params: {},
		type: 'navigate'
	})
}
const goRegister = () => {
	route({
		url: '/pages/register/index',
		params: {},
		type: 'navigate'
	})
}
onLoad(()=>{
	uni.showLoading({
		title: '加载中',
		mask: true
	})
	setTimeout(() => {
		uni.hideLoading()
	}, 1000)
	if(userStore.hasLogin) {
		
	}
})
</script>

<style lang="scss" scoped>
/* #ifndef APP-NVUE */
.wx-index {
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	position: relative;
}

/* #endif */
.wx-index {
	width: 100%;
	height: 100vh;
	overflow: hidden;
	position: relative;
}

.wx-btns {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	position: absolute;
	width: 100%;
	bottom: 40rpx;
	padding: 0 34rpx;
	box-sizing: border-box;
}

.wx-btn {
	width: 200rpx;
	height: 80rpx;
	line-height: 80rpx;
	text-align: center;
	border-radius: 12rpx;
	background-color: #007AFF;
	color: #fff;
	font-size: 32rpx;
}

.wx-btn-info {
	background-color: #05C160;
}

.wx-btn-normal {
	background-color: #18181A;
}

/* #ifndef APP-NVUE */
.wx-bg {
	width: 100vw;
	height: 100vh;
}

/* #endif */
.wx-bg {
	width: 100%;
	height: 100%;
}
</style>
